package com.sskj.wallet.presenter;

import android.app.PendingIntent;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.bean.PageBean;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.wallet.bean.StateTransferBean;
import com.sskj.wallet.ui.activity.RecordStateTransferActivity;


/**
 * @author Hey
 * Create at  2019/07/16
 */
public class RecordStateTransferPresenter extends BasePresenter<RecordStateTransferActivity> {

    public void getRecord(boolean showLoading, int page, int size) {
        httpService.getStateTransferRecord(page, size)
                .tag(this)
                .execute(new JsonCallBack<HttpData<PageBean<StateTransferBean>>>(showLoading ? this : null) {
                    @Override
                    public void onSuccess(Response<HttpData<PageBean<StateTransferBean>>> response) {
                        mView.getRecordOK(response.body().getData().getList());
                    }

                    @Override
                    public void onFinish() {
                        super.onFinish();
                        mView.stopRefresh();
                    }
                });
    }
}
